package com.shop.loan.proxy;

import com.shop.loan.model.Setting;
import com.shop.loan.redis.RedisCache;
import com.shop.loan.redis.RedisUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import xyz.erupt.annotation.fun.DataProxy;

import javax.annotation.Resource;

@Slf4j
@Component
public class SettingProxy implements DataProxy<Setting> {

    @Resource
    RedisUtil redisUtil;

    @Override
    public void afterUpdate(Setting setting) {
        redisUtil.del(RedisCache.settingCache);
    }


}
